CSS: A Power Course for Web Artists: Designing and styling websites with CSS3 by Team Htmleceous

CSS: A Power Course for Web Artists: Designing and styling websites with CSS3 by Team Htmleceous

Author:Team Htmleceous [Htmleceous, Team]
Language: eng
Format: azw3
Publisher: Htmleceous
Published: 2015-04-15T16:00:00+00:00


Listing 4.10: /c04/background-image-2.html

<!DOCTYPE html>

<html>

<head>

<title> Background Image </title>

<style>

body {

background-image: url(images/flower.png);

background-repeat: repeat-x;

}

</style>

</head>

<body>

<p>Apple is usually round, red or yellow, edible fruit of a small tree, Malus sylvestris, of the rose family.</p>

</body>

</html>

Figure 13

The background-attachment property lets you specify whether the background image should stay in one position or moves as the user scroll the page. This property can have two values: fixed and scroll. When you use the fixed value, the image stays in the same position of the page. Limiting 4.11 shows the use of this property. Figure 14 shows the result. Now, when you scroll the text the image should stay in the same position.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.